﻿/***************************************************************************
 *		ElGee Google Chart API Helper
 *		Copyright(C) 2011 by Laurent Geffroy lgeffroy@gmail.com
 * 
 *		This program is free software; you can redistribute it and/or 
 *		modify it under the terms of the GNU General Public License as
 *		published by the Free Software Foundation; either version 2 of 
 *		the License, or (at your option) any later version.
 *		
 *		This program is distributed WITHOUT ANY WARRANTY; without even the
 *		implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
 *		See the GNU General Public License for more details.
 *	
 *      For particular licensing, please contact me at lgeffroy@gmail.com
 *****************************************************************************/


namespace ElGee.Google.Charts
{
    /// <summary>
    /// Vertical Axis Class
    /// </summary>
    public class VAxis : Axis
    {

        /// <summary>
        /// Gets or sets the format.
        /// A format string for numeric axis labels. This is a subset of the ICU pattern set. For instance, {format:'#,###%'} will display values "1,000%", "750%", and "50%" for values 10, 7.5, and 0.5.
        /// </summary>
        /// <value>The format.</value>
        public string Format { get; set; }

        /// <summary>
        /// Gets or sets the min value.
        /// vAxis property that specifies the lowest axis grid line. The actual grid line will be the lower of two values: the minValue option value, or the lowest data value, rounded down to the next lower grid mark.
        /// </summary>
        /// <value>The min value.</value>
        public double MinValue { get; set; }

        /// <summary>
        /// Gets or sets the max value.
        /// vAxis property that specifies the highest  axis grid line. The actual grid line will be the greater of two values: the maxValue option value, or the highest data value, rounded up to the next higher grid mark.
        /// </summary>
        /// <value>The max value.</value>
        public double MaxValue { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [log scale].
        /// property that makes the axis a logarithmic scale (requires all values to be positive). Set to true for yes.
        /// </summary>
        /// <value><c>true</c> if [log scale]; otherwise, <c>false</c>.</value>
        public bool LogScale { get; set; }



        /// Gets a value indicating whether this instance is empty.
        /// </summary>
        /// <value><c>true</c> if this instance is empty; otherwise, <c>false</c>.</value>
        public override bool IsEmpty
        {
            get
            {
                if (!base.IsEmpty)
                    return false;

                return true;
            }
        }

        public override string ToString()
        {
            return base.ToString();
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="VAxis"/> class.
        /// </summary>
        public VAxis() : base()
        {
            LogScale = false;
            MinValue = double.MinValue;
            MaxValue = double.MinValue;
        }
    }
}
